package com.zhehekeji.opsys.api.entity;

// Generated 2016-11-3 10:47:48 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TSurveyChoice generated by hbm2java
 */
@Entity
@Table(name="t_survey_choice")
public class TSurveyChoice implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7331106884402985482L;
	private Long id;
	private TSurveyQuestion tsurveyQuestion;
	private String orderno;
	private String content;
	private Integer type;
	private Integer sequence;
	private Date createTime;
	private Integer status;
	private Long cpCode;

	public TSurveyChoice() {
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="QUESTION_ID")
	public TSurveyQuestion getTsurveyQuestion() {
		return tsurveyQuestion;
	}
	public void setTsurveyQuestion(TSurveyQuestion tsurveyQuestion) {
		this.tsurveyQuestion = tsurveyQuestion;
	}
	@Column(name="ORDERNO",length=8,nullable=true)
	public String getOrderno() {
		return this.orderno;
	}

	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}
	@Column(name="CONTENT",length=255,nullable=true)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	@Column(name="TYPE",length=2,nullable=true)
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name="SEQUENCE",length=11,nullable=true)
	public Integer getSequence() {
		return this.sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME",nullable=true)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name="STATUS",length=2,nullable=true)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return this.cpCode;
	}

	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}

}
